package me.wpf.insert;

import java.util.Iterator;

/**
 * Description: 创建多线程插入的异常
 *
 * @author 王朋飞
 * @create 2019/8/13
 */
public class HBaseInsertExceptor extends Exception {
    public HBaseInsertExceptor(String message) {
        super(message);
    }

    public final synchronized void addSuppresseds(Iterable<Exception> exceptions) {
        if (exceptions != null) {
            Iterator<Exception> iterator = exceptions.iterator();
            while (iterator.hasNext()) {
                addSuppressed(iterator.next());
            }
        }
    }
}
